<!DOCTYPE html>
<html>
<head lang="zh-cmn-Hans">
    <meta charset="UTF-8">
    <title>产品集列表</title>
    <link rel="stylesheet" type="text/css" href="../css/default.css">
    <link rel="stylesheet" type="text/css" href="../js/jquery-easyui-1.3.5/themes/gray/easyui.css">
    <link rel="stylesheet" type="text/css" href="../js/jquery-easyui-1.3.5/themes/icon.css"/>
    <script type="text/javascript" src="../js/jquery-easyui-1.3.5/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="../js/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/extends.js"></script>
    <script type="text/javascript" src="../js/common.js"></script>
    <script>



        function sub() {
            $('#ff').form({
                url: "/test",
                onSubmit: function () {
                    alert("a")
                    // do some check
                    // return false to prevent submit;
                }
                ,
                success: function (data) {
                    alert(data)
                }
            });
            // submit the form
            $('#ff').submit();
        }

    </script>
</head>
<body>
<form id="ff" method="post">
    <div>
        <label for="name">Name:</label>
        <input class="easyui-validatebox" type="text" name="name" id="name" data-options="required:true"/>
    </div>
    <div>
        <label for="email">Email:</label>
        <input class="easyui-validatebox" type="text" name="email" id="email" data-options="validType:'email'"/>
    </div>
</form>

<div class="windowButton" style="padding:10px">
    <a id="save" class="easyui-linkbutton my-dialog-button" plain="true" icon="icon-save"
       href="javascript:sub()">保存</a>
    <a id="cancel" class="easyui-linkbutton my-dialog-button" plain="true" icon="icon-cancel"
       href="javascript:void(0)">取消</a>
</div>

</body>
</html>